﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
using LynxWiki.DomainModel;
using LynxWiki.Search;

namespace LynxWiki
{
    public class TopicActionFilter : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            filterContext.Controller.ViewBag.Application = "Version: " + Assembly.GetExecutingAssembly().GetName().Version;
            filterContext.Controller.ViewBag.TagCloud = new TagCloud(LuceneSearch.GetTagCount());
        }
    }
}